package com.shopAuth.dao;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

import com.shopAuth.bean.Admin;

import org.apache.ibatis.annotations.Mapper;

@Mapper
public interface AdminMapper {
	@Select("select * from sys_admin where user=#{user}")
	public Admin getByUser(String user);
	
	@Insert("insert into sys_admin set id=#{id} , user=#{user} ,password=#{password}")
	public int insert(Admin admin);
	
	@Update("update sys_admin set password=#{password} where user=#{user}")
	public int update(@Param("user")String user,@Param("password") String password);
}
